public class ShoppingCart {
    public String cartContents;//定义购物车内容

    public void addToCart(){
        System.out.println(cartContents+"把购买的物品添加进购物车");
    }
}
